package com.red.wine.util;

import com.red.wine.WineApp;

import android.content.SharedPreferences;

/**
 * 
 */
public class PrefsUtils {
	private static final SharedPreferences prefs = WineApp.getInstance()
			.getSharedPreferences("whsy_prefs", 0);

	private static final String NAME = "name";

	public static void setName(String val) {
		prefs.edit().putString(NAME, val).commit();
	}

	public static String getName() {
		return prefs.getString(NAME, null);
	}

	private static final String first = "first";

	public static void setFirst(String val) {
		prefs.edit().putString(first, val).commit();
	}

	public static String getFirst() {
		return prefs.getString(first, null);
	}

	private static final String PASS = "pass";

	public static void setPass(String val) {
		prefs.edit().putString(PASS, val).commit();
	}

	public static String getPass() {
		return prefs.getString(PASS, null);
	}

	private static final String index = "index";

	public static void setIndex(String val) {
		prefs.edit().putString(index, val).commit();
	}

	public static String getIndex() {
		return prefs.getString(index, null);
	}

	private static final String HASE_REGISTER = "hase_register";

	public static void setHaseRegister(String val) {
		prefs.edit().putString(HASE_REGISTER, val).commit();
	}

	public static String getHaseRegister() {
		return prefs.getString(HASE_REGISTER, null);
	}
	
	private static final String SID = "user_sid";
	public static void setSid(String val) {
		prefs.edit().putString(SID, val).commit();
	}

	public static String getSid() {
		return prefs.getString(SID, null);
	}

	private static final String IMAGE_FILE = "images_file";

	public static String getImageFile() {
		return prefs.getString(IMAGE_FILE, null);
	}

	public static void setImageFile(String val) {
		prefs.edit().putString(IMAGE_FILE, val).commit();
	}

	private static final String REPORT_IMAGE_PATH = "img_path";

	public static void setReportImagePath(String val) {
		prefs.edit().putString(REPORT_IMAGE_PATH, val).commit();
	}

	public static String getReportImagePath() {
		return prefs.getString(REPORT_IMAGE_PATH, null);
	}

	private static final String CITY_NAME = "city_name";

	public static String getCityName() {
		return prefs.getString(CITY_NAME, null);
	}

	public static void setCityName(String val) {
		prefs.edit().putString(CITY_NAME, val).commit();
	}

	private static final String NI_CHENG = "ni_cheng";
	public static String getDyName() {
		return prefs.getString(NI_CHENG, null);
	}
	public static void setDyName(String val) {
		prefs.edit().putString(NI_CHENG, val).commit();
	}

	private static final String weiboType = "weiboType";
	public static String getWei() {
		return prefs.getString(weiboType, null);
	}
	public static void setWei(String val) {
		prefs.edit().putString(weiboType, val).commit();
	}
	private static final String qq = "qq";
	public static String getQQ() {
		return prefs.getString(qq, null);
	}
	public static void setQQ(String val) {
		prefs.edit().putString(qq, val).commit();
	}
	private static final String PersionFILE = "PersionFILE";
	public static String getPath() {
		return prefs.getString(PersionFILE, null);
	}
	public static void setPath(String val) {
		prefs.edit().putString(PersionFILE, val).commit();
	}

	
	private static final String SEX = "sex";

	public static String getSex() {
		return prefs.getString(SEX, null);
	}

	public static void setSex(String val) {
		prefs.edit().putString(SEX, val).commit();
	}

	private static final String CITY = "city";

	public static String getCity() {
		return prefs.getString(CITY, null);
	}

	public static void setCity(String val) {
		prefs.edit().putString(CITY, val).commit();
	}

	private static final String FROM = "is_from_pur";

	public static String getFrom() {
		return prefs.getString(FROM, null);
	}

	public static void setFrom(String val) {
		prefs.edit().putString(FROM, val).commit();
	}
}
